import Form from './form';
import FieldSelectCountryMock from './field-select-country';

export default {
	...Form,
	id: 'contributor',
	method: 'POST',
	action: '/submissions/9/publications/__publicationId__/contributors',
	fields: [
		{
			name: 'givenName',
			component: 'field-text',
			label: 'Given Name',
			groupId: 'default',
			isRequired: true,
			isMultilingual: true,
			isInert: false,
			value: {en: '', es: '', fr_CA: '', pt: ''},
			inputType: 'text',
			optIntoEdit: false,
			optIntoEditLabel: '',
			size: 'normal',
			prefix: '',
		},
		{
			name: 'familyName',
			component: 'field-text',
			label: 'Family Name',
			groupId: 'default',
			isRequired: false,
			isMultilingual: true,
			isInert: false,
			value: {en: '', es: '', fr_CA: '', pt: ''},
			inputType: 'text',
			optIntoEdit: false,
			optIntoEditLabel: '',
			size: 'normal',
			prefix: '',
		},
		{
			name: 'preferredPublicName',
			component: 'field-text',
			label: 'Preferred Public Name',
			description:
				'Please provide the full name as the author should be identified on the published work. Example: Dr. Alan P. Mwandenga',
			groupId: 'default',
			isRequired: false,
			isMultilingual: true,
			isInert: false,
			value: {en: '', es: '', fr_CA: '', pt: ''},
			inputType: 'text',
			optIntoEdit: false,
			optIntoEditLabel: '',
			size: 'normal',
			prefix: '',
		},
		{
			name: 'email',
			component: 'field-text',
			label: 'Email',
			groupId: 'default',
			isRequired: true,
			isMultilingual: false,
			isInert: false,
			value: null,
			inputType: 'text',
			optIntoEdit: false,
			optIntoEditLabel: '',
			size: 'normal',
			prefix: '',
		},
		FieldSelectCountryMock,
		{
			name: 'url',
			component: 'field-text',
			label: 'Homepage URL',
			groupId: 'default',
			isRequired: false,
			isMultilingual: false,
			isInert: false,
			value: null,
			inputType: 'text',
			optIntoEdit: false,
			optIntoEditLabel: '',
			size: 'normal',
			prefix: '',
		},
		{
			name: 'biography',
			component: 'field-rich-textarea',
			label: 'Bio Statement (e.g., department and rank)',
			groupId: 'default',
			isRequired: false,
			isMultilingual: true,
			isInert: false,
			value: {en: '', es: '', fr_CA: '', pt: ''},
			plugins: ['link'],
			toolbar: 'bold italic superscript subscript | link',
		},
		{
			name: 'affiliation',
			component: 'field-text',
			label: 'Affiliation',
			groupId: 'default',
			isRequired: false,
			isMultilingual: true,
			isInert: false,
			value: {en: '', es: '', fr_CA: '', pt: ''},
			inputType: 'text',
			optIntoEdit: false,
			optIntoEditLabel: '',
			size: 'normal',
			prefix: '',
		},
		{
			name: 'userGroupId',
			component: 'field-options',
			label: "Contributor's role",
			groupId: 'default',
			isRequired: false,
			isMultilingual: false,
			isInert: false,
			value: 14,
			type: 'radio',
			isOrderable: false,
			allowOnlySorting: false,
			options: [
				{value: 14, label: 'Author'},
				{value: 15, label: 'Translator'},
			],
		},
		{
			name: 'includeInBrowse',
			component: 'field-options',
			label: 'Publication Lists',
			groupId: 'default',
			isRequired: false,
			isMultilingual: false,
			isInert: false,
			value: true,
			type: 'checkbox',
			isOrderable: false,
			allowOnlySorting: false,
			options: [
				{
					value: true,
					label:
						'Include this contributor when identifying authors in lists of publications.',
				},
			],
		},
	],
	groups: [{id: 'default', pageId: 'default'}],
	hiddenFields: {},
	supportedFormLocales: [
		{key: 'en', label: 'English'},
		{key: 'es', label: 'Spanish'},
		{key: 'fr_CA', label: 'French (Canada)'},
		{key: 'pt', label: 'Portuguese'},
	],
};
